package com.roadmap.ajax.handler;

import com.roadmap.common.BaseEntity;
import com.roadmap.exception.ActionNotSupportedException;
import com.roadmap.exception.EntityNotFoundException;
import com.roadmap.exception.InvalidActionException;
import com.roadmap.exception.InvalidQueryException;
import com.roadmap.exception.InvalidStatusException;
import com.roadmap.exception.InvalidValueException;
import com.roadmap.exception.NotAuthorizedException;
import com.roadmap.exception.NotMatchedException;
import com.roadmap.exception.NullObjectException;
import com.roadmap.exception.ServerException;

@Deprecated
public interface ILogicHandler {
	/**
	 * create a new entry in database
	 */
	public void create(BaseEntity entry) throws NullObjectException,
			InvalidActionException, InvalidValueException, ServerException,
			EntityNotFoundException, ActionNotSupportedException,
			InvalidStatusException, NotAuthorizedException;

	/**
	 * update the entry in database
	 */
	public void edit(BaseEntity entry) throws NullObjectException,
			InvalidActionException, InvalidValueException, ServerException,
			NotMatchedException;

	public void delete(String entityId) throws ServerException,
			InvalidQueryException, InvalidValueException,
			InvalidActionException, EntityNotFoundException,
			NotAuthorizedException, ActionNotSupportedException;

	public Object complete(String entityId) throws NullObjectException,
			ServerException, InvalidValueException, EntityNotFoundException,
			InvalidActionException, NotAuthorizedException,
			ActionNotSupportedException, InvalidStatusException;

	public Object cancel(String entityId) throws NullObjectException,
			ServerException, InvalidValueException, EntityNotFoundException,
			InvalidActionException, NotAuthorizedException,
			ActionNotSupportedException;
}
